﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SosaAnalysisModule.Data
{
    //Used for Analysis Module to return distance statistics
    //Data returned is composed of 
    //  Min: minimum distance between any two pegs
    //  Max: maximum distance between any two pegs
    //  Avg: average distance between all pegs
    public class DistanceStat
    {
        public double min;
        public double max;
        public double avg;

        public DistanceStat(double _min, double _max, double _avg)
        {
            min = _min;
            max = _max;
            avg = _avg;
        }

        public void add(DistanceStat ds)
        {
            min += ds.min;
            max += ds.max;
            avg += ds.avg;
        }

        public DistanceStat divide(double x)
        {
            return new DistanceStat(min / x, max / x, avg / x);
        }
    }
}
